package com.fc.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fc.dto.LogisticsCompleteDTO;
import com.fc.dto.LogisticsDTO;
import com.fc.dto.pageQuery.LogisticsPageQueryDTO;
import com.fc.entity.Logistics;
import com.fc.result.PageResult;

import java.time.LocalDateTime;
import java.util.List;


public interface ILogisticsService extends IService<Logistics> {

    /**
     * 物流信息填写和提交
     *
     * @param logisticsDTO
     */
    Long commit(LogisticsDTO logisticsDTO);

    /**
     * 物流信息修改
     *
     * @param logisticsDTO
     */
    void updateLogistics(LogisticsDTO logisticsDTO);

    /**
     * 物流运输完成
     *
     * @return
     */
    void complete(LogisticsCompleteDTO logisticsCompleteDTO);

    /**
     * 查询物流信息列表
     *
     * @return
     */
    PageResult listLogistics(LogisticsPageQueryDTO logisticsPageQueryDTO);

    /**
     * 根据用户id和时间区域查询物流信息
     * @param driverId
     * @param start
     * @param end
     * @return
     */
    List<Logistics> getByDriverIdAndTimeRange(Long driverId, LocalDateTime start, LocalDateTime end);


}
